package com.teziyou.commodity.enumtype;

public enum CategoryEnum {
	
	TICKET(1, "票务分类"),
	LINE(2, "线路分类"),
	SCENETHEME(3,"景区主题分类"),
	OTHERIT(0220,"其他的itemType"),
	SCENETHEMEIT(0241,"景区的itemType");
	
	private int code;
	private String desc;
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	private CategoryEnum(int code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public CategoryEnum getEnumByCode(int code) {
		CategoryEnum[] enums = CategoryEnum.values();
		for(CategoryEnum enumtype:enums) {
			if(code==enumtype.getCode()) return enumtype;
		}
		return null;
	}

}
